package com.zhku.onlineshop.Service.impl;

import com.zhku.onlineshop.Dao.AddressDao;
import com.zhku.onlineshop.Pojo.Address;
import com.zhku.onlineshop.Service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {

    @Autowired
    private AddressDao addressDao;
    @Override
    public boolean AddAddress(Address address) {
        return addressDao.AddAddress(address);
    }

    @Override
    public boolean DelAddressById(Integer id) {
        return addressDao.DelAddressById(id);
    }

    @Override
    public boolean UpdAddressById(Address address) {
        return addressDao.UpdAddressById(address);
    }

    @Override
    public List<Address> SelAddressById(Integer userId) {
        return addressDao.SelAddressById(userId);
    }

    @Override
    public List<Address> SelAddressByAddressId(Integer id) {
        return addressDao.SelAddressByAddressId(id);
    }
}
